import request, { upload } from '@/utils/request'

export function listDisposalRegistered(query) {
  return request({
    url: '/sacw/disposal/registered/list',
    method: 'get',
    params: query
  })
}

export function disposalRegisteredInfo(id) {
  return request({
    url: `/sacw/disposal/registered/${id}`,
    method: 'get'
  })
}
export function updateInfo(data) {
  return request({
    url: `/sacw/disposal/info`,
    method: 'post',
    data: data
  })
}

export function addPro(data) {
  return request({
    url: `/sacw/disposal/pro`,
    method: 'put',
    data: data
  })
}
export function deletePro(id) {
  return request({
    url: `/sacw/disposal/pro/${id}`,
    method: 'delete'
  })
}
export function uploadAnnex(formData) {
  return upload(`/sacw/disposal/annex`,formData)
}
export function deleteAnnex(id) {
  return request({
    url: `/sacw/disposal/annex/${id}`,
    method: 'delete'
  })
}
export function deleteDisposalRegistered(id) {
  return request({
    url: `/sacw/disposal/registered/${id}`,
    method: 'delete'
  })
}

export function bankConfigInsertOrUpdate(data) {
  return request({
    url: '/sacw/disposal/bankConfig',
    method: 'post',
    data: data
  })
}

export function getDisposalBankConfigList() {
  return request({
    url: '/sacw/disposal/bankConfig/list',
    method: 'get'
  })
}

export function bankConfigDelete(id) {
  return request({
    url: `/sacw/disposal/bankConfig/${id}`,
    method: 'delete'
  })
}


